<!--<template>-->
    <!--<div class="box">-->
        <!--<button class="btn" @click="findall">显示</button>-->
        <!--</div>-->
    <!--</div>-->
<!--</template>-->
<!--<script>-->
    <!--import axios from 'axios';-->
    <!--export default {-->
        <!--data(){-->
            <!--return {-->
                <!--url: 'url',-->
                <!--users: [],-->
            <!--}-->
        <!--},-->
        <!--methods:{-->
            <!--findall(){-->
                <!--axios({-->
                    <!--url: 'http://localhost:9091/findall',-->
                    <!--method:'post',-->
                <!--}).then(function (response) {-->
                    <!--console.log(response.data);-->
                    <!--alert(response.data.data);-->
                <!--})-->

            <!--}-->
        <!--}-->
    <!--}-->
<!--</script>-->
<template>
    <el-table
            :data="users"
            stripe
            style="width: 100%">
        <el-table-column
                prop="id"
                label="id"
        >
        </el-table-column>
        <el-table-column
                prop="number"
                label="账号"
        >
        </el-table-column>
        <el-table-column
                prop="gender"
                label="性别"
        >
        </el-table-column>
        <el-table-column
                prop="name"
                label="名字"
        >
        </el-table-column>
    </el-table>
</template>

<script>
    export default{
        data() {
            return {
                users:[]
            }
        },
        created: function () {
            this.$http.get('http://localhost:9091/findall')
                    .then((response) => {
                console.log(response.data.data)
            this.users = response.data.data

        }).catch(function(response) {
                console.log(response)
            });
        },
    }
</script>
